from gameset.phoenicia.base import *

from .coal import Charcoal
from .metal import Metal, Ore, MetalGood


class FineMetal(Metal):
    singular =_ ('Fine Metal')
    plural   =_ ('Fine Metal')


class SilverOre(Ore):
    singular =_ ('Silver Ore')
    plural   =_ ('Silver Ore')
    price    =_ (200)


class GoldOre(Ore):
    singular =_ ('Gold Ore')
    plural   =_ ('Gold Ore')
    price    =_ (1000)


class Silver(FineMetal):
    singular   =_ ('Silver')
    plural     =_ ('Silver')
    price      =_ (2000)
    ore        =_ (SilverOre(1))
    smelt_time =_ (0.2)
    quality    =_ (0.5)


class Gold(FineMetal):
    singular   =_ ('Gold')
    plural     =_ ('Gold')
    price      =_ (10000)
    ore        =_ (GoldOre(1))
    smelt_time =_ (0.5)
    quality    =_ (0.9)


class Mint(Workshop):
    name     =_ ('Mint')
    color    =_ (Yellow)
    cost     =_ (1500)
    staff    =_ (20)
    size     =_ (5)
    produces =_ (Production(input    = (Silver(10), Charcoal(1)),
                            create   = ('150 Coins', lambda self, building, num: building.city.add_money(num * 150)),
                            duration = 2),
                 Production(input    = (Gold(10), Charcoal(1)),
                            create   = ('800 Coins', lambda self, building, num: building.city.add_money(num * 800)),
                            duration = 2))
